<template>
  <div>
    <h2>我是用户界面</h2>
    <p>我是用户的相关信息</p>
    <p>用户Id: {{userId}}</p>
  </div>
</template>

<script>
  export default {
    name: "User",
    computed: {
      userId() {
        return this.$route.params.userId;
      }
    },
    created() {
      console.log("User组件 created");
    },
    destroyed() {
      console.log("User组件 destroyed");
    },
    activated() {
      console.log("User组件 activated");
    },
    deactivated() {
      console.log("User组件 deactivated");
    }
  }
</script>

<style scoped>

</style>
